package com.example.javabase.cls;

/**
 * @author haitao
 * @date 2021/10/8 9:44 上午
 */
public class OuterCls {
    private String name;
    public String getName(){
        return name;
    }

    public Object getInnerCls(){
        int localVariable = 0;
        class Inner{
            public void println(){
                System.out.println("localVariable " + localVariable);
            }
        }
        return new Inner();
    }

    public static void main(String[] args) {
        OuterCls out = new OuterCls();
        Object inner = out.getInnerCls();
    }
}